package com.zhao.controller;

import com.zhao.service.FeignService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>视图控制层</p>
 * <p>创建时间：2021/02/24/10:25</p>
 *
 * @author ZhangZhao
 * @version 1.0
 */
@Slf4j
@RestController
public class ConsumerController {

    final FeignService feignService;

    public ConsumerController(FeignService feignService) {
        this.feignService = feignService;
    }

    @RequestMapping("/getUserInfo")
    String getUserInfo(){
        return feignService.getUserInfoList();
    }

    @RequestMapping("/startDispatch")
    String startDispatch(String dispatchId,String time){
        return feignService.startDispatch(dispatchId,time);
    }
    @RequestMapping("/stopDispatch")
    String stopDispatch(String dispatchId){
        return feignService.stopDispatch(dispatchId);
    }
}
